package com.farm.service.impl;
import com.farm.dao.IndexMapper;
import com.farm.opjo.Index;
import com.farm.reception.WebIndex;
import com.farm.service.IndexService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;

@Service
public class IndexServiceImpl implements IndexService {
    @Autowired
    private IndexMapper indexMapper;
    /**
     * 新增
     * @param index
     */
    @Override
    public void add(Index index) {

    }

    /**
     * 根据id删除
     * @param id
     */
    @Override
    public void delete(int id) {

    }

    /**
     * 根据ID更新
     * @param index
     */
    @Override
    public void update(Index index) {

    }

    /**
     *条件+分页查询
     * @param page
     * @param size
     * @return
     */
    @Override
    public Page<WebIndex> findPage(Map searchMap, int page, int size) {
        return null;
    }

    @Override
    public Index findById(int id) {
        return  indexMapper.findById ( id );
    }
}
